﻿/// <summary>
///
/// </summary>

/// <summary>
///
/// </summary>
using System.Collections.Generic;
using md.imi.membranes.objects.membranes;
using md.imi.membranes.objects.strings;

namespace md.imi.membranes.objects.rules
{
    using System;
    using System.Xml.Serialization;

    [Serializable]
    [XmlInclude(typeof(LeftHandRule))]
    [XmlInclude(typeof(RightHandRule))]
    [XmlInclude(typeof(ReplicationRule))]
    public class Rule : CoreObject
    {
        // private Rule rule;

        public Rule()
        {
        }

        public Rule(Rule rule)
        {
            this.Label = rule.Label;
        }

        /// <summary>
        ///     Rule identification
        /// </summary>
        public String Label { get; set; }

        public virtual List<Solution> CalculateAvailableSolutions(Membrane currentMembrane, int stringObjectIndex)
        {
            return null;
        }

        public override string ToString()
        {
            return Label;
        }

        public virtual void ApplyRule(Solution solution,  psystems.PSystemsTree parrentConfig)
        {
            throw new NotImplementedException();
        }
        
        public virtual Rule GetCopy ()
        {
            var newRule = new Rule(this);
            return newRule;
        }
    }
}